﻿<!--
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Public License (Ms-PL).
// Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
// All other rights reserved.
-->

<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    xmlns:Controls="clr-namespace:Coding4Fun.Chair.Cockpit.Controls"
	xmlns:Coding4Fun="clr-namespace:Coding4Fun.Kinect.Wpf.Controls;assembly=Coding4Fun.Kinect.Wpf" 
	mc:Ignorable="d"
	x:Class="Coding4Fun.Chair.Cockpit.MainWindow"
	x:Name="Window"
	Title="Coding4Fun: Project Jellybean"
	WindowStyle="None" 
    Background="#FF666666" 
    ResizeMode="NoResize" 
    WindowStartupLocation="CenterScreen" 
    WindowState="Maximized" 
    KeyDown="Window_KeyDown" 
    Icon="Resources/favicon.ico" 
    Cursor="None">

	<Window.Resources>
		<System:Double x:Key="TargetSize">70</System:Double>
		<Storyboard x:Key="uxSBGameLoop" Duration="00:00:00.033">
			<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="LayoutRoot">
				<DiscreteObjectKeyFrame KeyTime="0">
					<DiscreteObjectKeyFrame.Value>
						<Visibility>Visible</Visibility>
					</DiscreteObjectKeyFrame.Value>
				</DiscreteObjectKeyFrame>
			</ObjectAnimationUsingKeyFrames>
		</Storyboard>
	</Window.Resources>

	<Grid x:Name="LayoutRoot">
		<Grid x:Name="uxBackground" Background="Black">
			<Grid.ColumnDefinitions>
                <ColumnDefinition Width="200" />
				<ColumnDefinition />
				<ColumnDefinition Width="200" />
            </Grid.ColumnDefinitions>
            <Grid Background="#FF666666" Grid.Column="1">
				<Image x:Name="uxRGBSource" Stretch="UniformToFill" Source="/Coding4Fun.Chair.Cockpit;component/initSizing.png" />
                <Rectangle HorizontalAlignment="Right" Width="80" Opacity="0.5" RenderTransformOrigin="0.5,0.5">
                    <Rectangle.Fill>
                        <LinearGradientBrush EndPoint="0, 0" StartPoint="1,0">
                            <GradientStop Color="Black" Offset="0"/>
                            <GradientStop Color="Transparent" Offset="1"/>
                        </LinearGradientBrush>
                    </Rectangle.Fill>
                </Rectangle>
                <Rectangle HorizontalAlignment="Left" Width="80" Opacity="0.5">
                    <Rectangle.Fill>
                        <LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
                            <GradientStop Color="Black" Offset="0"/>
                            <GradientStop Color="Transparent" Offset="1"/>
                        </LinearGradientBrush>
                    </Rectangle.Fill>
                </Rectangle>
            </Grid>
            <Grid>
                <Controls:NumericStream x:Name="uxNumericStreamLeft"/>
                <Image HorizontalAlignment="Right" Source="/Resources/SideShader.png" Stretch="None"/>
            </Grid>

            <Grid Grid.Column="2">
    			<Controls:NumericStream x:Name="uxNumericStreamRight"/>
                <Image Source="/Resources/SideShader.png" Stretch="None" HorizontalAlignment="Left" RenderTransformOrigin="0.5,0.5">
                    <Image.RenderTransform>
                        <TransformGroup>
                            <ScaleTransform ScaleX="-1"/>
                        </TransformGroup>
                    </Image.RenderTransform>
                </Image>
            </Grid>
            <Grid Grid.Column="1">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                    <Controls:Reticule x:Name="uxLeftReticule" Margin="50" />
                    <Controls:Reticule x:Name="uxRightReticule" Margin="50" />
                </StackPanel>
                <StackPanel HorizontalAlignment="Right" VerticalAlignment="Center" Margin="45">

                    <Coding4Fun:HoverButton
                        x:Name="uxHornButton" 
                        ImageSize="115" 
                        ImageSource="/Resources/HornButton.png" 
                        ActiveImageSource="/Resources/HornButton_Active.png" 
                        IsTriggeredOnHover="True" />

					<Coding4Fun:HoverButton
                        x:Name="uxPowerButton" 
                        ImageSize="115" 
                        TimeInterval="1000"
                        ImageSource="/Resources/PowerButton.png"
                        ActiveImageSource="/Resources/PowerButton_Active.png" 
                        Margin="0, 125" />

					<Coding4Fun:HoverButton
                        x:Name="uxReclineButton" 
                        ImageSize="115" 
                        TimeInterval="1000"
                        ImageSource="/Resources/ReclinerButton.png" 
                        ActiveImageSource="/Resources/ReclinerButton_Active.png"  />
                    
                </StackPanel>
                <Controls:ControlStick x:Name="uxLeftControlStick" />
                <Controls:ControlStick x:Name="uxRightControlStick"/>
            </Grid>
        </Grid>
        
        <!-- Compass -->
		<Grid x:Name="uxWheelPowerGrid" HorizontalAlignment="Left" Height="233" VerticalAlignment="Top" Width="233" Margin="7,322,0,0">
			<Image Margin="-4" Source="Resources/PowerGrid.png" Stretch="Fill"/>
			<Controls:WheelPowerMeter x:Name="uxWheelPowerMeterLeftFront" HorizontalAlignment="Left" VerticalAlignment="Top"/>
			<Controls:WheelPowerMeter x:Name="uxWheelPowerMeterRightFront" HorizontalAlignment="Right" VerticalAlignment="Top"/>
			<Controls:WheelPowerMeter x:Name="uxWheelPowerMeterLeftBack" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
			<Controls:WheelPowerMeter x:Name="uxWheelPowerMeterRightBack" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
			<Controls:Compass x:Name="uxCompass" Margin="5,35,0,0"  />
			<Controls:Speedometer x:Name="uxSpeedometer" VerticalAlignment="Center" Margin="9,0,0,99"/>
		</Grid>
        
        <!-- Depth Camera-->
		<Border HorizontalAlignment="Left" Height="216" VerticalAlignment="Top" Width="290" BorderBrush="White" BorderThickness="1" CornerRadius="2" Margin="7,622,0,0" >
			<Border.Background>
				<RadialGradientBrush RadiusY="0.812" RadiusX="0.618">
					<GradientStop Color="#FF333333" Offset="0"/>
					<GradientStop Color="Black" Offset="1"/>
				</RadialGradientBrush>
			</Border.Background>
			<Image x:Name="uxDepthMapImage"/>
		</Border>
		
        <Controls:MessagePanel x:Name="MessagePrompt" VerticalAlignment="Bottom" />
    </Grid>
</Window>